package com.jweb.framework.core.channel;

import com.jweb.framework.core.CoreException;
import com.jweb.framework.core.Dispatcher;
import com.jweb.framework.core.DispatcherAware;
import com.jweb.framework.core.service.ServiceRegistry;
import com.jweb.framework.core.service.ServiceRegistryAware;

public interface Endpoint<Request , Response> extends DispatcherAware , ServiceRegistryAware {
	
	public void setInterceptors(ChannelInterceptor<Request , Response>[] interceptors);
	
	public void injectDispatcher(Dispatcher dispatcher) ;
	
	public void injectServiceRegistry(ServiceRegistry serviceRegistry);
	
	public void service(ChannelContext<Request , Response> channelContext) throws CoreException;
	
}
